﻿@model Apps.Models.Flow.Flow_TypeModel
@using Apps.Common;
@using Apps.Models.Flow;
@using Apps.Web.Core;
@using Apps.Models.Sys;
@using Apps.Locale;
@{
    ViewBag.Title = "修改";
    Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";
    List<permModel> perm = null;
}

<script type="text/javascript">
    $(function () {
        $("#btnSave").click(function () {
            if ($("form").valid()) {
                $.ajax({
                    url: "@Url.Action("Edit")",
                type: "Post",
                data: $("form").serialize(),
                dataType: "json",
                success: function (data) {
                    if (data.type == 1) {
                        window.parent.frameReturnByMes(data.message);
                        window.parent.frameReturnByReload(true);
                        window.parent.frameReturnByClose()
                    }
                    else {
                        window.parent.frameReturnByMes(data.message);
                    }
                }
            });
        }
        return false;
    });
    $("#btnReturn").click(function () {
        window.parent.frameReturnByClose();
    });
});
</script>
<style type="text/css">
    .formtable th {
        width: 12%;
        height: 35px;
        font-size: 12px;
    }

    .formtable td {
        width: 55%;
    }

    /*input[type="datetime"] {
        width: 98%;
    }*/

    input[type="text"] {
        width: 90%;
    }

    input[type="number"] {
        width: 90%;
    }

    select {
        width: 90%;
    }

    textarea {
        width: 90%;
        height: 40px;
    }
</style>
<div class="mvctool bgb">
@Html.ToolButton("btnSave", "fa fa-save", Resource.Save,ref perm, "Save", true)
@Html.ToolButton("btnReturn", "fa fa-reply", Resource.Reply, false)
</div>

@*<div id="p" class="easyui-panel"   style="width:100%;padding:10px;">*@

    @using (Html.BeginForm())
    {
        @Html.HiddenFor(model => model.Id)
        @Html.HiddenFor(model => model.CreateTime)
        <table class="formtable">
            <tbody>
                <tr>
                    <th>
                        @Html.LabelFor(model => model.Name,0)：
                    </th>
                    <td>
                        @Html.EditorFor(model => model.Name) 
                        @*@Html.ValidationMessageFor(model => model.Name)*@
                    </td>
                </tr>
                <tr>
                    <th>
                        @Html.LabelFor(model => model.Remark)：
                    </th>
                    <td>
                        @Html.TextAreaFor(model => model.Remark)
                        @*@Html.ValidationMessageFor(model => model.Remark)*@
                    </td>
                </tr>
                <tr style="display:none">
                    <th>
                        @Html.LabelFor(model => model.CreateTime)：
                    </th>
                    <td>
                        @Html.TextBoxFor(model => model.CreateTime, new { @readonly = "readonly" })
                        @*@Html.ValidationMessageFor(model => model.CreateTime)*@
                    </td>
                </tr>
                <tr>
                    <th>
                        @Html.LabelFor(model => model.Sort,0)：
                    </th>
                    <td>
                        @Html.EditorFor(model => model.Sort) 
                        @*@Html.ValidationMessageFor(model => model.Sort)*@
                    </td>
                </tr>
            </tbody>
        </table>
        @Html.ValidationSummary()
    }
@*</div>*@